home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bcsrce2.zip / COPYD.BC < prev    next >
Text File  |  1990-02-14  |  3KB  |  103 lines

  1. echo off
  2. let %!a = %1
  3. if %!a# = # goto INPUT
  4. goto TEST1
  5. :TEST1
  6. if not exist %!a goto ERROR
  7. if %!b# = # goto TEST2
  8. let %!b = %2
  9. goto ACT
  10. :TEST2
  11. let %!b = a:*.*
  12. cls
  13. gosub BASICS
  14. locate 8 4
  15. echonolf  █  Target   █
  16. locate 9 4
  17. echonolf  █  Filespec █
  18. locate 10 4
  19. echonolf  █  Missing  █
  20. locate 15 1
  21. echonolf Input target filespec (Ex:  A:*.*):
  22. read %!b
  23. goto ACT
  24. :INPUT
  25. let %!a = *.*
  26. let %!b = a:*.*
  27. cls
  28. gosub BASICS
  29. locate 8 4
  30. echonolf  █  Waiting  █
  31. locate 9 4
  32. echonolf  █  for      █
  33. locate 10 4
  34. echonolf  █  Input!   █
  35. locate 15 1
  36. echonolf Input Source filespec (Ex:  ABC*.DOC):\\32
  37. read %!a
  38. let %!z = %!a
  39. string_length %!z
  40. lt %!z 3
  41. if errorlevel 1 goto input
  42. locate 16 1
  43. echonolf Input target filespec (Ex:  A:*.*):\\32\\32\\32\\32
  44. read %!b
  45. goto ACT
  46. :SYNTAX
  47. cls
  48. echo.
  49. echo.
  50. echo.
  51. echo SYNTAX---:  COPYD [Source] [Destination]
  52. echo USAGE----:  Copies file(s) to destination. If file(s) exist in target
  53. echo             directory, only new version of same name is copied over.
  54. echo.
  55. echo EXAMPLE--:  COPYD *.DOC A:*.*
  56. echo.
  57. echo.
  58. waitkey 2
  59. goto END
  60. :BASICS
  61. echonolf ╔══════════════════════════════════════════════════════════════════════════════╗
  62. echonolf ║                                  DOS BASICS                                  ║
  63. echonolf ║                                                                              ║
  64. echonolf ║ Suggested Filenaming:  A-Z, underscore, 0-9, begin with letter avoid dash(-) ║
  65. echonolf ║ Wildcards:  Filenams.Ext = File????.Ex? = Fil*.E?t = F*.* = ????N*.??t = *.* ║
  66. echonolf ║ Directory Anatomy:  C:\DIR\SUBDIR\SUBDIR2\Filespec.Ext                       ║
  67. echonolf ║ ╔════════════════╗  │  │   ├──────┘       └─Name of file(s) and Extension    ║
  68. echonolf ║ ║                ║  │  │   └─Subdirectories with required "\" divider        ║
  69. echonolf ║ ║                ║  │  └─1st Level directory preceded with required ":\"     ║
  70. echonolf ║ ║                ║  └─Drive identifier A-E unless Network loaded then A-Z    ║
  71. echonolf ╚═╩════════════════╩═══════════════════════════════════════════════════════════╝
  72. return
  73. goto END
  74. :ACT
  75. if not exist %!a goto ERROR
  76. echo.
  77. echo                             █  Copying files, please wait █
  78. Copyd %!a %!b
  79. goto SYNTAX
  80. :SYNTAX
  81. cls
  82. echo                        If running COPYD from the DOS PROPMT:
  83. echo.
  84. echo.
  85. echo.
  86. echo.
  87. echo       SYNTAX---:  COPYD [Source] [Destination]
  88. echo       USAGE----:  Copies file(s) to destination. If file(s) exist in target
  89. echo                   directory, only new version of same name is copied over.
  90. echo.
  91. echo       EXAMPLE--:  COPYD *.DOC A:*.*
  92. echo.
  93. echo.
  94. waitkey 2
  95. goto END
  96. :ERROR
  97. echo  Unable to verify existance of Source Filespec %!a
  98. echo.
  99. waitkey 3
  100. goto SYNTAX
  101. :END
  102.  
  103.